<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址：https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------

namespace app\api\service\sys;


use app\service\core\sys\CoreConfigService;
use app\core\base\BaseApiService;

/**
 * 配置服务层
 * Class ConfigService
 * @package app\service\core\sys
 */
class ConfigService extends BaseApiService
{
    //系统配置文件


    public function __construct()
    {
        parent::__construct();

    }

    /**
     * 获取平台收货地址
     * @return array|mixed
     */
    public function getAddress()
    {
        $info = ( new CoreConfigService() )->getConfigValue('ADDRESS_INFO');
        if (empty($info)) {
            $info = [
                'province' => 0,
                'city' => 0,
                'district' => 0,
                'address' => '',
                'full_address' => '',
                'name' => '',
                'mobile' => '',
            ];
        }
        return $info;
    }
}
